<template>
	<view class="page">
		<block v-if="loadShow">
			<view class="">
				<view class="bg-white text-center flex-col col-center result-header">
					<u-image width="165rpx" height="165rpx" class="m-t-42" :src="getStatus.img" />
					<view class="m-t-32 lg bold">{{getStatus.text}}</view>
					<!-- 1 2 3 -->
					<view class="header-btn mt20" v-if="info.audit_status==3">
						<navigator url="/bundle/pages/dr_apply/dr_apply?again=1" open-type="redirect"  hover-class="none">重新提交</navigator>
					</view>
				</view>
				
				<!--  -->
				<view class="bg-white p_20 mt20">
					<view class="apply-form-item flex row-between">
						<view><text class="primary ">*</text>司机姓名</view>
						<view>{{info.driver_name}}</view>
					</view>
					<view class="apply-form-item flex row-between">
						<view><text class="primary ">*</text>联系方式</view>
						<view>{{info.mobile}}</view>
					</view>
					<view class="apply-form-item flex row-between">
						<view><text class="primary ">*</text>身份证号</view>
						<view>{{info.id_card}}</view>
					</view>
					<view class="apply-form-item flex row-between">
						<view><text class="primary ">*</text>车牌信息</view>
						<view>{{car.licence}}</view>
					</view>
					<view class="apply-form-item flex row-between">
						<view><text class="primary ">*</text>车辆类型</view>
						<view>{{car.brand_model}}</view>
					</view>
					<view class="apply-form-item flex row-between">
						<view><text class="primary ">*</text>品牌型号</view>
						<view>{{car.carConfig.car_name}}</view>
					</view>
					
					<view class="apply-form-image">
						<view class="p-b-10"><text class="primary ">*</text>车辆右前照</view>
						<view >
							<image :src="car.left_img" mode="" style="width: 180upx;height: 180upx;"></image>
						</view>
					</view>
					<view class="apply-form-image">
						<view class="p-b-10"><text class="primary ">*</text>车辆左前照</view>
						<view >
							<image :src="car.right_img" mode="" ></image>
						</view>
					</view>
					<view class="apply-form-image">
						<view class="p-b-10"><text class="primary ">*</text>身份证正面照</view>
						<view >
							<image :src="info.id_card_front" mode="" ></image>
						</view>
					</view>
					<view class="apply-form-image">
						<view class="p-b-10"><text class="primary ">*</text>身份证反面照</view>
						<view >
							<image :src="info.id_card_contrary" mode=""></image>
						</view>
					</view>
					<view class="apply-form-image">
						<view class="p-b-10"><text class="primary ">*</text>驾驶证照片</view>
						<view >
							<image :src="info.driving_licence" mode="" ></image>
						</view>
					</view>
				</view>
			</view>
		</block>
	</view>
</template>

<script>
	import {drApplyDetail} from '@/api/car'
	export default {
		data() {
			return {
				loadShow:false,
				info:{},
				car:{}
			}
		},
		onLoad(option) {
			
			this.drApplyDetailFun();
		},
		methods: {
			drApplyDetailFun(){
				let {apply_id} = this;
				drApplyDetail().then(res=>{
					console.log(res);
					if(res.code==1){
						this.info = res.data;
						this.car = res.data.car;
						this.loadShow = true;
					}
					
				}).catch(err=>{
					console.log(err)
				})
			}
		},
		computed: {
			getStatus() {
				const {
					info: {
						audit_status
					}
				} = this
				switch (audit_status) {
					case 1:
						return {
							img: '/static/images/img_store_submit.png',
								text: '恭喜您，资料提交成功！',
								desc: '预计在3个工作日内审核完毕，如通过我们将会发送短信通知您，请注意查收！'
						}
						case 2:
							return {
								img: '/static/images/img_store_success.png',
									text: '恭喜您，审核已通过！',
									desc: '温馨提示：密码是您在创建账号时设置的登录密码，如忘记密码可联系官方客服进行修改！'
							}
							case 3:
								return {
									img: '/static/images/img_store_fail.png',
										text: '很遗憾，审核不通过！',
										desc: '请尽量完善您的资料信息再重新提交！'
								}
								default:
									return {}
				}
		
			}
		}
	}
</script>

<style scoped>
	.result-header{
		padding: 0 75rpx 50rpx;
		border-radius: 10rpx;
	}
	.page{
		padding: 10upx 20upx 60upx 20upx;
	}
	.p_20{
		padding: 0upx 20upx;
	}
	.apply-form-item{
		padding: 30upx 10upx;
		border-bottom: 2upx #eee solid;
	}
	.apply-form-image{
		padding: 20upx 10upx;
	}
	.apply-form-image image{
		width: 180upx;
		height: 180upx;
		border-radius: 10upx;
		overflow: hidden;
	}
	.mt20{
		margin-top: 20upx;
	}
	.header-btn{
		border:2upx #ddd solid;
		padding: 16upx 24upx;
		width: 100%;
		border-radius: 5000upx;
	}
</style>
